<#function _getType row>
    <#if row.type == 'CHAR' || row.type == 'VARCHAR' || row.type == "TINYTEXT" || row.type == "TEXT" || row.type == "MEDIUMTEXT" || row.type == "LONGTEXT"><#return "String" /></#if>
    <#if row.type == 'TINYBLOB' || row.type == 'BLOB' || row.type == 'MEDIUMBLOB' || row.type == 'LONGBLOB'><#return "byte[]" /></#if>
    <#if row.type == 'TINYINT' && row.length == 1><#return "Boolean" /></#if>
    <#if row.type == 'TINYINT'><#return "Byte" /></#if>
    <#if row.type == 'BIGINT'><#return "Long" /></#if>
    <#if row.type == 'SMALLINT' || row.type == 'INT' || row.type == 'INTEGER' || row.type == 'MEDIUMINT'><#return "Integer" /></#if>
    <#if row.type == 'FLOAT' || row.type == 'DOUBLE' || row.type == 'NUMERIC' || row.type == 'DECIMAL'><#return "BigDecimal" /></#if>
    <#if row.type == 'DATE' || row.type == 'DATETIME' || row.type == 'TIMESTAMP'><#return "Date" /></#if>
    <#if row.type == 'TIME'><#return "Time" /></#if>
    <#if row.type == 'YEAR'><#return "Integer" /></#if>
    <#return "String"/>
</#function>
<#list table.fields as row>
    <#if row.isPrimaryKey>
        <#assign pk=row />
        <#assign pkVariable=pk.camelCaseName/>
        <#assign pkName=pk.name/>
        <#assign getPk='get' + pkVariable?cap_first />
        <#assign pkType=_getType(pk) />
        <#if pkType == 'BigDecimal'><#assign pkImport='import java.math.BigDecimal;' /></#if>
        <#break />
    </#if>
</#list>
